**# Bookmark #1 Setting

*Windows
global root  = "G:/Dropbox/Environmental Injustice/Empirical"
global rawdata = "$root/rawdata"
global workdata = "$root/workdata"
global results = "$root/results"
global outfile = "$root/outfile"

cd "$workdata"

**# Bookmark #2.1 Panel A
    
use "$outfile/Firm_regression.dta",clear
    
reghdfe codemission c.belowcl##i.post ,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S12.xls",replace ctitle("Firm-level COD Emission") ///
addtext(Firm FE, YES, IndustrybyYear FE, NO, ProvincebyYear FE, YES, IndustrybyRegionbyYear FE, NO, IndustrybyProvincebyYear FE, NO) ///
bdec(3) tdec(3) rdec(3)

use "$outfile/Table S12.dta",clear

reghdfe codemission c.belowcl##i.post ,absorb(i.id i.province#i.year i.ind#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S12.xls",append ctitle("Firm-level COD Emission") ///
addtext(Firm FE, YES, IndustrybyYear FE, YES, ProvincebyYear FE, YES, IndustrybyRegionbyYear FE, NO, IndustrybyProvincebyYear FE, NO) ///
bdec(3) tdec(3) rdec(3)

reghdfe codemission c.belowcl##i.post ,absorb(i.id i.region#i.ind#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S12.xls",append ctitle("Firm-level COD Emission") ///
addtext(Firm FE, YES, IndustrybyYear FE, NO, ProvincebyYear FE, NO, IndustrybyRegionbyYear FE, YES, IndustrybyProvincebyYear FE, NO) ///
bdec(3) tdec(3) rdec(3)

**# Bookmark #2.2 Panel B
    
use "$outfile/Firm_regression.dta",clear
    
reghdfe codemission c.belowhs##i.post ,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S12.xls",append ctitle("Firm-level COD Emission") ///
addtext(Firm FE, YES, IndustrybyYear FE, NO, ProvincebyYear FE, YES, IndustrybyRegionbyYear FE, NO, IndustrybyProvincebyYear FE, NO) ///
bdec(3) tdec(3) rdec(3)

use "$outfile/Table S12.dta",clear

reghdfe codemission c.belowhs##i.post ,absorb(i.id i.province#i.year i.ind#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S12.xls",append ctitle("Firm-level COD Emission") ///
addtext(Firm FE, YES, IndustrybyYear FE, YES, ProvincebyYear FE, YES, IndustrybyRegionbyYear FE, NO, IndustrybyProvincebyYear FE, NO) ///
bdec(3) tdec(3) rdec(3)

reghdfe codemission c.belowhs##i.post ,absorb(i.id i.region#i.ind#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S12.xls",append ctitle("Firm-level COD Emission") ///
addtext(Firm FE, YES, IndustrybyYear FE, NO, ProvincebyYear FE, NO, IndustrybyRegionbyYear FE, YES, IndustrybyProvincebyYear FE, NO) ///
bdec(3) tdec(3) rdec(3)
